package org.springblade.modules.admin.dto.contract;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author zcc
 * @version 1.0
 * @date 2025/8/12 9:16
 */
@Data
public class ContractSearchDTO {

	@ApiModelProperty("当前页")
	private Integer current =1;

	@ApiModelProperty("每页的数量")
	private Integer size = 20;

	@ApiModelProperty("1:默认维保中的电梯,0否")
	private Integer type = 1;

	@ApiModelProperty("1:续签合同,2:待审核合同,3:服务电梯合同,4:全部合同5:丢保合同")
	private Integer searchType;

	@ApiModelProperty("合同编号")
	private String contractNo;


	@ApiModelProperty("项目ids")
	private List<Long> buildingIds;

	@ApiModelProperty("商务用户名称")
	private Long userNameId;
//----------------合同待续签的筛选条件----------------------------------------

	@ApiModelProperty("1:即将到期60天2:即将到期90,3:已到期")
	private Integer towSearchType;

	@ApiModelProperty("合同状态")
	private Integer contractStatus;

	@ApiModelProperty("合同状态")
	private List<Integer> contractStatuss;

	@ApiModelProperty("合同管理状态")
	private List<Integer> contractExtStatuss;

	@ApiModelProperty("超时类型 1:刚到期,2:超出3天,3:超出7天,4:超时1个月,5:超2月以上")
	private Integer timeOutType;
	private Integer timeOutBeginDay;
	private Integer timeOutEndDay;


	@ApiModelProperty("即将超时类型 1:不足7天,2:不足30天,3:不足60天,4:不足90天")
	private Integer aboutEndType;
	private Integer aboutEndBeginDay;
	private Integer aboutEndEndDay;

	public void setAboutEndType(Integer aboutEndType) {
		this.aboutEndType = aboutEndType;
		if (aboutEndType == 1) {
			this.aboutEndBeginDay = 0;
			this.aboutEndEndDay = 7;
		}
		if (aboutEndType == 2) {
			this.aboutEndBeginDay = 8;
			this.aboutEndEndDay = 30;
		}
		if (aboutEndType == 3) {
			this.aboutEndBeginDay = 31;
			this.aboutEndEndDay = 60;
		}
		if (aboutEndType == 4) {
			this.aboutEndBeginDay = 61;
			this.aboutEndEndDay = 90;
		}
	}


	public void setTimeOutType(Integer timeOutType) {
		this.timeOutType = timeOutType;
		if (timeOutType == 1) {
			this.timeOutBeginDay = 0;
			this.timeOutEndDay = 2;
		}
		if (timeOutType == 2) {
			this.timeOutBeginDay = 3;
			this.timeOutEndDay = 6;
		}

		if (timeOutType == 3) {
			this.timeOutBeginDay = 7;
			this.timeOutEndDay = 29;
		}
		if (timeOutType == 4) {
			this.timeOutBeginDay = 30;
			this.timeOutEndDay = 59;
		}

		if (timeOutType == 5) {
			this.timeOutBeginDay = 60;
			this.timeOutEndDay = 50000;
		}

	}

	//-------待审核列表的筛选条件----------

	@ApiModelProperty("待审核时间")
	private Integer disCheckDay;


	//-------服务电梯筛选条件----------

	@ApiModelProperty("1:待审核2:未生效3:合同期内4:合同到期5:已终止6:已作废7:审核不通过")
	private Integer allStatus;

	@ApiModelProperty("是否收费合同 1:收费0非")
	private Integer isFree;

	@ApiModelProperty("1:免保0:非免保")
	private Integer isHasEpiboly;

	@ApiModelProperty("1:已变更0:非变更")
	private Integer changeType;

	@ApiModelProperty("审核时间-开始时间")
	private Date checkTimeBegin;
	@ApiModelProperty("审核时间-结束时间")
	private Date checkTimeEnd;

	@ApiModelProperty("合同生效时间-开始时间")
	private Date effectTimeBegin;
	@ApiModelProperty("合同生效时间-结束时间")
	private Date effectTimeEnd;

	@ApiModelProperty("合同到期时间-开始时间")
	private Date endTimeBegin;
	@ApiModelProperty("合同到期时间-结束时间")
	private Date endTimeEnd;

	@ApiModelProperty("合同终止时间-结束时间")
	private Date stopTimeBegin;
	@ApiModelProperty("合同到期时间-结束时间")
	private Date stopTimeEnd;


	@ApiModelProperty("合同脱保时间-结束时间")
	private Date tuoTimeBegin;
	@ApiModelProperty("合同脱保时间-结束时间")
	private Date tuoTimeEnd;


	//---------------丢保原因--------------------

	@ApiModelProperty("脱保类型1:服务不达标2:竞对签约3:客户暂停使用电梯4:其他")
	private Integer tuoType;
}
